package com.none.web.controller.pushTask;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.TimerTask;

public class DelQRcodeTask extends TimerTask{
	private static DelQRcodeTask delQRcodeTask = new DelQRcodeTask();

	@SuppressWarnings("unused")
	@Override
	public void run() {

		URL url=null;  
		try {  
		    //要根据部署的服务器url，修改  
		    //url = new URL("http://192.168.2.222:8080/staff/bookapp/deleteQRImageAfterCancel");
		    url = new URL("http://120.24.55.7:9191/staff/bookapp/deleteQRImageAfterCancel");
		} catch (MalformedURLException e) {  
		    e.printStackTrace();  
		}  
		BufferedReader r=null;  
		try {  
		    URLConnection con=url.openConnection();  
		    r = new BufferedReader(new InputStreamReader(con.getInputStream(),"UTF-8"));  
		   // System.out.println(r.toString());
		} catch (UnsupportedEncodingException e1) {  
		    e1.printStackTrace();  
		} catch (IOException e1) {  
		    e1.printStackTrace();  
		}  
	}

	public static TimerTask getInstance() {
		return delQRcodeTask;
	}
}
